/**
 * Created by IvanPan on 14-12-02.
 */

/**
 *依赖popup/popup.js
 * * @param msg
 * @param icon [ succeed,question,warning ]
 * @param showMask 显示遮罩层，布尔值，true或者false，默认为true
 * @param width
 * @param time
 * @param timeoutFun
 * msg,icon,showMask,width,time,timeoutFun
 */
function alertMsg(msg,options){
    var defaults = {
        icon:"warning",
        showMask:true,
        width:280,
        time:1000,
        timeoutFun:null
    };
    var opts = $.extend(defaults,options);
    $.msgBox.prompt({
        title:'提示',
        msg : msg,
        icon : opts.icon,
        showMask : opts.showMask,
        width : opts.width,
        time:opts.time,
        timeoutFun:function(){
            if(opts.timeoutFun != undefined && opts.timeoutFun  != null)
                opts.timeoutFun();
        }
    });
}